package oop2.oop3;

/**
 * @author oldliu
 * @since 1.0
 */
public class Pet {
    private String name;
    private int love;
    protected  int health;

    public Pet(){

    }
    public Pet(String name, int love, int health) {
        this.name = name;
        this.love = love;
        this.health = health;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    protected int getLove() {
        return love;
    }

    public void setLove(int love) {
        this.love = love;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }
    public void eat(){
        System.out.println(name+"Zai chifan");
    }
    public void sleep(){
        System.out.println(name+"再睡觉");
    }
    public void show(){
        System.out.println("宠物名叫"+name+",健康值："+health+"，可爱值："+love);
    }
}
